From 2d56c97b8ee0525bcc6fe108a757bac95b0e1931 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Tue, 7 Feb 2012 09:37:59 +0000 Subject: [PATCH] rebuildFileCache now really disable debugToolbar r110761 did not properly disabled the debug toolbar. It has to be done before Setup.php (MWDebug uses a private static to track that global variable). really fix r110758 / r110762 --- maintenance/rebuildFileCache.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/maintenance/rebuildFileCache.php b/maintenance/rebuildFileCache.php index 441310da2a..e7ce3521c7 100644 --- a/maintenance/rebuildFileCache.php +++ b/maintenance/rebuildFileCache.php @@ -32,15 +32,21 @@ class RebuildFileCache extends Maintenance { $this->setBatchSize( 100 ); } + public function finalSetup() { + global $wgDebugToolbar; + + // Debug toolbar makes content uncacheable so we disable it. + // Has to be done before Setup.php initialize MWDebug + $wgDebugToolbar = false; + parent::finalSetup(); + } + public function execute() { global $wgUseFileCache, $wgReadOnly, $wgContentNamespaces, $wgRequestTime; - global $wgDebugToolbar; global $wgTitle, $wgOut; if ( !$wgUseFileCache ) { $this->error( "Nothing to do -- \$wgUseFileCache is disabled.", true ); } - // Debug toolbar makes content uncacheable - $wgDebugToolbar = false; $wgReadOnly = 'Building cache'; // avoid DB writes (like enotif/counters) -- 2.20.1